package cn.com.huzo.webapp.controller.manufacture;

import huzofw.common.web.controller.BaseFormController;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 生产进度跟踪画面控制器
 *
 * @author 吴旭
 */
@Controller
@RequestMapping(value = "/manufacture/product_progress_tracking")
public class ProductProgressTrackingController extends BaseFormController {

    // <editor-fold defaultstate="collapsed" desc="属性">
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="画面处理部分">
    /**
     * 跳转到合同评审一览画面
     * <p>
     * @param request
     * @return
     * @throws java.lang.Exception
     */
    @RequestMapping("/list.html")
    public ModelAndView redirectListWnd(HttpServletRequest request) throws Exception {
        ModelAndView view = new ModelAndView();
        view.setViewName("manufacture.product_progress_tracking.list.def");
        return view;
    }

    /**
     * 跳转合同评审编辑画面
     * <p>
     * @param request 上下文请求
     * @param action 操作标志 1;增加 2：编辑
     * @param headerId 合同评审标识
     * @return
     * @throws java.lang.Exception
     */
    @RequestMapping("/{action}/{headerId}/edit.html")
    public ModelAndView redirectEditWnd(HttpServletRequest request, @PathVariable(value = "action") int action,
            @PathVariable(value = "headerId") Long headerId) throws Exception {
        ModelAndView view = new ModelAndView();
        view.addObject("action", action);
        view.addObject("headerId", headerId.toString());
        view.setViewName("manufacture.product_progress_tracking.edit.def");
        return view;
    }
    // </editor-fold>

    // <editor-fold defaultstate="collapsed" desc="主表处理部分">
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="明细处理部分">
    // </editor-fold>
}
